package spring01.dip;

//老司机类
public class Driver extends Thread{

    private Girl girl;

    ////将**小姐姐注入到老司机的怀抱
    public Driver(Girl girl) {
        this.girl = girl;
    }

    //司机的主要职责就是驾驶汽车
    public void drive() {
        girl.run();
    }
}